<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>知果汇</title>
    <link href="__STATIC__/admin/css/bootstrap.min.css" rel="stylesheet">
    <link href="__STATIC__/admin/css/simple-line-icons.css" rel="stylesheet">
    <link href="__STATIC__/admin/css/font-awesome.min.css" rel="stylesheet">
    <link href="__STATIC__/admin/css/jasny-bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="__STATIC__/admin/css/nanoscroller.css">
    <link href="__STATIC__/admin/css/style.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="__STATIC__/admin/css/jquery-ui.css">
    <!--[if lt IE 9]>
    <script src="__STATIC__/admin/js/html5shiv.min.js"></script>
    <script src="__STATIC__/admin/js/respond.min.js"></script>
    <![endif]-->
    <style type="text/css">
        body {
            background-color: #ffffff;
            min-width: 600px;
        }

        .row {
            margin-left: 0px;
            margin-right: 0px;
            min-width: 600px;
        }

        .form .row {
            margin-top: 5px;
        }

        p {
            margin: 0;
        }

        .form .row img {
            width: 128px;
            height: 128px;
            margin-bottom: 5px;
        }

        .formControls {
            padding-right: 10px;
        }

        .radio-box {
            display: inline-block;
            width: 64px;
        }

        .formControls {
            padding-right: 50px;
            position: relative;
        }

        .textarea {
            height: 100px;
            resize: none;
            font-size: 14px;
            padding: 4px;
        }

        .textarea-numberbar {
            position: absolute;
            right: 70px;
            bottom: 5px;
            z-index: 1;
            margin-bottom: 0;
        }
    </style>
</head>
<body>
<article class="page-container">
    <form class="form form-horizontal" id="form-admin-add">

    </form>
</article>

<script src="__STATIC__/admin/js/jquery.min.js"></script>
<script src="__STATIC__/admin/js/bootstrap.min.js"></script>
<script src="__STATIC__/admin/js/jasny-bootstrap.min.js"></script>
<script src="__STATIC__/admin/js/jquery.slimscroll.min.js"></script>
<script src="__STATIC__/admin/js/jquery.nanoscroller.min.js"></script>
<script src="__STATIC__/admin/js/metismenu.min.js"></script>
<script src="__STATIC__/admin/js/float-custom.js"></script>
<script type="text/javascript" src="__STATIC__/admin/js/layer/layer.js"></script>
<script type="text/javascript" src="__STATIC__/admin/js/laypage/laypage.js"></script>
<script type="text/javascript" src="__STATIC__/admin/js/laydata/laydate.js"></script>
<script type="text/javascript" src="__STATIC__/admin/js/getMyDate.js"></script>
<script type="text/javascript">
    var url = window.location.href;
    id = url.split("#")[1];
    $.ajax({
        type: 'GET',
        url: "{:url('api/authentication/authentication_enterprise_msg')}",
        dataType: 'jsonp',
        jsonp: 'callback',
        data: {id: id},
        success: function (msg) {
            if (msg.code == 200) {
                var time = msg.data.time;
                ltime = getMyDate(time * 1000);

                var html = '';
                if (msg.data.c_type == 2) {
                    html += '<div class="row cl"><label class="form-label col-xs-3 col-sm-3">单位类型：</label>' +
                        '<div class="formControls col-xs-9 col-sm-9"><span class="select-box" style="width:150px;"></span>' +
                        '<p>事业单位</p></div></div><div class="row cl"><label class="form-label col-xs-3 col-sm-3">' +
                        '事业单位名称：</label><div class="formControls col-xs-9 col-sm-9">' +
                        '<span class="select-box" style="width:150px;"></span>' +
                        '<p>' + msg.data.company_name + '</p></div></div><div class="row cl">' +
                        '<label class="form-label col-xs-3 col-sm-3">事证号：</label>' +
                        '<div class="formControls col-xs-9 col-sm-9"><span class="select-box" style="width:150px;"></span>' +
                        '<p>' + msg.data.regist_number + '</p></div></div>';
                } else if (msg.data.c_type == 1 && msg.data.d_type == 1) {
                    html += '<div class="row cl"><label class="form-label col-xs-3 col-sm-3">单位类型：</label>' +
                        '<div class="formControls col-xs-9 col-sm-9"><span class="select-box" style="width:150px;"></span>' +
                        '<p>普通企业</p></div></div><div class="row cl"><label class="form-label col-xs-3 col-sm-3">' +
                        '证件类型：</label><div class="formControls col-xs-9 col-sm-9">' +
                        '<span class="select-box" style="width:150px;"></span>' +
                        '<p>普通营业执照(有组织机构代码证和税务登记证)</p></div></div><div class="row cl">' +
                        '<label class="form-label col-xs-3 col-sm-3">企业名称：</label>' +
                        '<div class="formControls col-xs-9 col-sm-9"><span class="select-box" style="width:150px;"></span>' +
                        '<p>' + msg.data.company_name + '</p></div></div><div class="row cl">' +
                        '<label class="form-label col-xs-3 col-sm-3">企业注册号：</label>' +
                        '<div class="formControls col-xs-9 col-sm-9"><span class="select-box" style="width:150px;"></span>' +
                        '<p>' + msg.data.regist_number + '</p></div></div>';
                } else if (msg.data.c_type == 1 && msg.data.d_type == 2) {
                    html += '<div class="row cl"><label class="form-label col-xs-3 col-sm-3">单位类型：</label>' +
                        '<div class="formControls col-xs-9 col-sm-9"><span class="select-box" style="width:150px;"></span>' +
                        '<p>普通企业</p></div></div><div class="row cl"><label class="form-label col-xs-3 col-sm-3">' +
                        '证件类型：</label><div class="formControls col-xs-9 col-sm-9">' +
                        '<span class="select-box" style="width:150px;"></span>' +
                        '<p>多证合一营业执照(无组织机构代码证和税务登记证)</p></div></div><div class="row cl">' +
                        '<label class="form-label col-xs-3 col-sm-3">企业名称：</label>' +
                        '<div class="formControls col-xs-9 col-sm-9"><span class="select-box" style="width:150px;"></span>' +
                        '<p>' + msg.data.company_name + '</p></div></div><div class="row cl">' +
                        '<label class="form-label col-xs-3 col-sm-3">企业注册号：</label>' +
                        '<div class="formControls col-xs-9 col-sm-9"><span class="select-box" style="width:150px;"></span>' +
                        '<p>' + msg.data.regist_number + '</p></div></div>';
                }
                html += '<div class="row cl"><label class="form-label col-xs-3 col-sm-3">企业期限：</label>' +
                    '<div class="formControls col-xs-9 col-sm-9"><span class="select-box" style="width:150px;"></span>' +
                    '<p>' + msg.data.company_year + '</p></div></div>';
                if (msg.data.d_type != 2) {
                    html += '<div class="row cl"><label class="form-label col-xs-3 col-sm-3">组织机构代码：</label>' +
                        '<div class="formControls col-xs-9 col-sm-9"><span class="select-box" style="width:150px;"></span>' +
                        '<p>' + msg.data.o_code + '</p></div></div><div class="row cl"><label class="form-label col-xs-3 col-sm-3">税务登记号：</label>' +
                        '<div class="formControls col-xs-9 col-sm-9"><span class="select-box" style="width:150px;"></span>' +
                        '<p>' + msg.data.tax_number + '</p></div></div>';
                }
                html += '<div class="row cl"><label class="form-label col-xs-3 col-sm-3">营业执照图片：</label>' +
                    '<div class="formControls col-xs-9 col-sm-9 ">';
					if(msg.data.d_type != 2){
						html +='<img src="/Images/company/' + msg.data.business_pic + '"><img src="/Images/company/' + msg.data.code_pic + '"><img src="/Images/company/' + msg.data.tax_pic + '">';
					}else{
						html +='<img src="/Images/company/' + msg.data.business_pic + '">';
					}
				html+='<span class="select-box" style="width:150px;"></span></div></div>';
				html+='<div class="row cl"><label class="form-label col-xs-3 col-sm-3">法定代表姓名</label><div class="formControls col-xs-9 col-sm-9"><p>'+ msg.data.legal_name + '</p></div></div>';
                html+='<div class="row cl"><label class="form-label col-xs-3 col-sm-3">法定代表身份证</label><div class="formControls col-xs-9 col-sm-9"><p>'+ msg.data.legal_card + '</p></div></div>';
				html+='<div class="row cl"><label class="form-label col-xs-3 col-sm-3">法定代表证件有效期</label><div class="formControls col-xs-9 col-sm-9"><p>'+ msg.data.legal_date + '</p></div></div>';
				html+='<div class="row cl"><label class="form-label col-xs-3 col-sm-3">法定代表证件图片</label><div class="formControls col-xs-9 col-sm-9"><img src="/Images/authentication/' + msg.data.legal_face + '"><img src="/Images/authentication/' + msg.data.legal_back + '"></div></div>';
				html+='<div class="row cl"><label class="form-label col-xs-3 col-sm-3">负责人姓名</label><div class="formControls col-xs-9 col-sm-9"><p>'+ msg.data.nick + '</p></div></div>';
				html+='<div class="row cl"><label class="form-label col-xs-3 col-sm-3">负责人支付宝账号</label><div class="formControls col-xs-9 col-sm-9"><p>'+ msg.data.alipay + '</p></div></div>';
				html+='<div class="row cl"><label class="form-label col-xs-3 col-sm-3">负责人手机号码</label><div class="formControls col-xs-9 col-sm-9"><p>'+ msg.data.phone + '</p></div></div>';
				html+='<div class="row cl"><label class="form-label col-xs-3 col-sm-3">负责人身份证</label><div class="formControls col-xs-9 col-sm-9"><p>'+ msg.data.card + '</p></div></div>';
				html+='<div class="row cl"><label class="form-label col-xs-3 col-sm-3">负责人证件有效期</label><div class="formControls col-xs-9 col-sm-9"><p>'+ msg.data.validity_time + '</p></div></div>';
				html+='<div class="row cl"><label class="form-label col-xs-3 col-sm-3">负责人证件图片</label><div class="formControls col-xs-9 col-sm-9"><img src="/Images/authentication/' + msg.data.charge_face + '"><img src="/Images/authentication/' + msg.data.charge_back + '"></div></div>';
				html+='<div class="row cl"><label class="form-label col-xs-3 col-sm-3">负责人授权书图片</label><div class="formControls col-xs-9 col-sm-9"><img src="/Images/company/' + msg.data.authorization_image + '"></div></div>';
				html+=  '<div class="row cl"><label class="form-label col-xs-3 col-sm-3">' +
                    '创建时间：</label><div class="formControls col-xs-9 col-sm-9"><p>' + ltime + '</p></div></div>' +
                    '<div class="row cl"><label class="form-label col-xs-3 col-sm-3">状态：</label>';
                if (msg.data.static == 1) {
                    html += '<div class="formControls col-xs-9 col-sm-9"><p>待审核</p></div>';
                } else if (msg.data.static == 2) {
                    html += '<div class="formControls col-xs-9 col-sm-9"><p>审核成功</p></div>';
                } else if (msg.data.static == 3) {
                    html += '<div class="formControls col-xs-9 col-sm-9"><p>审核失败</p></div>';
                }
                html += '</div>' +
                    '<div class="row cl"><label class="form-label col-xs-3 col-sm-3">审核失败原因：</label>' +
                    '<div class="formControls col-xs-9 col-sm-9"><p>' + msg.data.result + '</p></div></div>';
                $("#form-admin-add").append(html);
                

            } else {
                layer.msg('获取信息不成功!', {icon: 5, time: 2000});
            }
        }
    })
</script>
</body>
</html>